﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for B_GRN
/// </summary>
/// 
namespace Bestlife.ERP.BusinessRules
{
    public class B_GRN
    {
        public B_GRN()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public static Bestlife.ERP.Entities.E_GRN getGRNdetails(string grnid)
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.getGRNdetails(grnid);
        }

        public static decimal grandtotal(string grnid)
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.grandtotal(grnid);
        }

        public static decimal lastapproveid()
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.lastgrnnot_approve();
        }

        public static Boolean upd_Supp(Bestlife.ERP.Entities.E_PurchaseOrder grn, string user)
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.upd_supplier(grn,user);
        }
        public static Boolean upd_GRN(Bestlife.ERP.Entities.E_PurchaseOrder grn, string user)
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.upd_GRN(grn, user);
        }

        public static Boolean upd_GRNbytot(Bestlife.ERP.Entities.E_PurchaseOrder grn, string user)
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.upd_GRNbytot(grn, user);
        }
        public static string select_product(string proid)
        {
            return Bestlife.ERP.DataAccess.D_ApproveGRN.select_product(proid);
        }
    }
}